home *** CD-ROM | disk | FTP | other *** search
- Path: ch-as27.peinet.pe.ca!wbmcmast
- From: wbmcmast@bud.peinet.pe.ca
- Newsgroups: comp.lang.c++
- Subject: Trouble writing windows DLL in Borland C++ 4.5
- Date: Thu, 15 Feb 1996 10:14:38 LOCAL
- Organization: PEINet
- Message-ID: <wbmcmast.2.00659551@bud.peinet.pe.ca>
- NNTP-Posting-Host: ch-as27.peinet.pe.ca
- X-Newsreader: Trumpet for Windows [Version 1.0 Rev B final beta #4]
-
- I am writing my first DLL in BC++ 4.5 and am having some problems. I have
- written other DLL's in BC++ 2.0 and didn't have too much problem, although the
- code in the DLL did not have any Windows related stuff in it.
-
- The ultimate goal is to add some functionality to WordPerfect 5.2. This the
- same thing that I did with the last one I wrote.
-
- I am starting up the learning curve by using the dlldemo project that comes
- with BC++ 4.5. I have the DLLSHELL.CPP in front of me and see the LibMain()
- and the WEP() functions. When I wrote the one in 2.0 I just included the
- LibMain() and WEP() functions and then several _export functions and compiled
- and linked it as a DLL file.
-
- When I tried this in BC++ 4.5, I can't even get it linked. The linker seems
- to be looking for a definition for OwlMain(-----). The only way I can get it
- to link is to define a WinMain() function. When I do this however, then
- WordPerfect seems to complain that the resulting .exe is not a dll. I have
- the 16 bit Compiler Entry/Exit Code set to Windows DLL all functions exportable
-
-
- What am I doing wrong here? How can I get BC++4.5 to generate a .dll file?
- Do I need WinMain() and LibMain()? Why do I get the linker error when I
- try to link without the WinMain()?
-
- W.B.McMaster
- Veterans Affairs Canada
- mcmaster@cycor.ca
-